As the demand for multi-channel high-quality audio has been increased recently, the interest in digital multi-channel audio compression algorithm has been also increased. In order to research compression technologies for digital audio and video, ISO/IEC (International Standards Organization/International Electrotechnical Commission) founded ISO/MPEG (Moving Pictures Expert Group) in 1988. In 1994, ISO/MPEG started a standardization work for a new compression method available in application fields, in which compatibility with MPEG-1 stereo format was dispensable, and in the process of the work, the standard was designated MPEG-2 NBC (Non-Backward Compatible). Before starting the standardization work, ISO/MPEG had taken a comparative tests of MPEG-2 BC (Backward Compatible) compatible with MPEG-1, with Dolby's AC-3 and AT&T's MPAC, then they reached the conclusion that removing the backward compatibility resulted improvements in the performance of the coder. The goal of MPEG-2 NBC was that the quality of 5-channel full-bandwidth audio signals with a bit rate under 384 kbit/s reached the “aurally indistinguishable” level defined by ITU/R (International Telecommunication Union, Radiocommunication Bureau). Thereafter, MPEG-2 NBC was announced as a new international standard for multi-channel audio coding method in April 1997, and at that time the name was changed to MPEG-2 AAC (Advanced Audio Coding, ISO/IEC 138187). MPEG-2 AAC has been standardized through the above-mentioned process, and is an audio coding method which encodes 5-channel audio signals into high-quality audio data with the bit rate of 320 kbps (64 kbps per one channel).
FIG. 1 is a block diagram that shows an MPEG-2 AAC audio decoding algorithm in the prior art. With reference to FIG. 1, in the MPEG-2 AAC audio algorithm, high-resolution filter bank; prediction coding; sound pressure stereo coding; TNS (Temporal Noise Shaping); and Huffman coding are combined in order to provide an “aurally indistinguishable” sound quality from that of the original sound, with the bit rate under 384 kbit/s. This MPEG-2 AAC audio compression algorithm is a kind of transform coding method using MDCT (Modified Discrete Cosine Transform), and a bit allocation method based on a psychological sound model is used in order to compress the transformed signal.
Further, considering the trade-off among the sound quality, the memory usage, and the power demand, the MPEG-2 AAC audio system supports three types of profile, i.e., the main profile, the LC (Low Complexity) profile, and the SSR (Scalable Sampling Rate) profile are supported.
First, the main profile provides the best sound quality with a given bit rate, and all the tools of AAC are used only except the gain control tool. The main profile is capable of decoding the bit stream of LC profile which may be mentioned later.
Second, the LC profile is the most frequently used profile in general, both the prediction tool and the gain control tool are not used, further the degree of the TNS is limited. The LC profile is characterized by its lower memory usage and power demand than those of the main profile, though its sound quality is relatively acceptable.
And last, the SSR profile consists of the LC profile and the gain control tool. But the prediction tool is not used, moreover the bandwidth as well as the degree of the TNS is limited. The advantage of the SSR profile is that it provides variable frequency signal even though it has lower complexity than that of the main profile or the LC profile.
FIG. 2 provides a graph showing the amount of operations of MPEG-2 AAC LC profile designated by ISO/IEC. As is shown in FIG. 2, Huffman decoding process which is run in the first step of AAC decoding process takes approximately 30% of the amount of total operation in AAC decoding system. Huffman decoding process has to run maximum 289 comparative operations in the worst case according to the characteristic of the input sample, when it is implemented by software on the general programmable processors. In addition, bit line extraction, XOR, OR, and shift operation is needed additionally in order to run the comparative operations above, so a large operation cycle which takes approximately 30% of the amount of total AAC decoding operations is consumed in case that Huffman decoding process is implemented only by software.
The object of Huffman decoding process is to get Huffman index, relating to Huffman code word contained in a bit line, defined in MPEG-2 or MPEG-4 AAC standard documents. Primarily, one of the 12 Huffman tables is selected by using the code book information shown in the additional information of the bit line, and the bit line is compared with the code word on the selected table, then a correspondent index of code is used as a Huffman decoding output relating to one code word.
At present, there are some audio only DSP chips which do not use software method but use Huffman specialized decoder in order to reduce the amount of operations and the complexity in Huffman decoding process. While using software method, Huffman index is located by comparing every one bit of every one codeword. However, the specialized hardware decoder generally has an architecture which outputs Huffman index directly in a short operation cycle by means of a specific hardware storing 12 Huffman tables and all the code words. The Huffman specialized decoder such as the above-mentioned is mainly applied to audio signal processing DSP chips and provides related instructions.
FIG. 3 presents a diagram showing Huffman decoder in the prior art. Huffman index which is the output data of Huffman decoding process is finally stored in an accumulator in DSP chip. In general, most of the specialized hardware Huffman decoders consume 1 or 2 cycles for getting one Huffman index. However, Huffman index should pass the ungrouping process before transformed into a quantized spectrum value, and Huffman index stored in the accumulator should be transferred to a general register in order to run this process. Though, because this process needs XOR operation, OR operation, shift operation, and data transfer instructions, there is a problem that approximately 5 or 6 cycles are consumed before Huffman decoding result is stored in the general register finally. That is, there are unnecessary operation cycles, because normal specialized Huffman decoders do not have an architecture which is directly applied to the ungrouping process, the next step of Huffman decoding process, and reduces the operation cycles.
The sample data quantized after Huffman decoding is transformed into a spectrum data which is an original real number by applying a scale factor. The process above is called dequantization or inverse quantization, and run according to formula 1 and formula 2 below.x_invquant=Sign(x_quant)·|x_quant|4/3∀k  Formula 1gain=20.25·(sf[g][sfb]−SF_OFFSET)  Formula 2
In formula 1, x_quant is an ungrouping data of the output of Huffman decoding process, and it is a quantized spectrum data. x_invquant is inverse quantized spectrum data. In formula 2, sf[g] [sfb] is an array comprising the scale factors of each group, and SF_OFFSET is a constant number of 100. The inverse quantization process uses nonlinear quantization method, and decodes the sample values expressed as an integer by the quantization in a coder into an original real number data. That is, a final real number spectrum data necessary for the operation is obtained by multiplying the gain obtained in formula 2 by x_invquant in formula 1.
As is shown in FIG. 2, though the inverse quantization process above does not have a large amount of operations, it is located on the first step of AAC decoding process and generates the real number spectrum data necessary for the operations of decoding steps after this, so correctness of the data is important. If the nonlinear, inverse quantized real number data is not correct, an error occurred at this time becomes an initial accumulation error in MPEG-2 or MPEG-4 AAC decoding process after this, so a correct operation result is needed.
In addition, the inverse quantization process contains a 4/3 power as is shown in formula 1. It is generally impossible to implement a 4/3 power operation on a fixed point DSP, then LUT (Lookup Table) method which calls and uses a value relating to the input from the table made in advance is used primarily. According to the standard of AAC, |x_quant| which is used as an input of the inverse quantization process is defined as having the range below 8191. However, to use a table having 8191 data for the 4/3 power operation has a disadvantage that hardware size of total processor becomes too large. Therefore, a table having 256 or 128 data is implemented in hardware, and computed values by an interpolation method are used for the rest values, in general.
There are many methods for the interpolation above, and the following is an example of them.
Formula 3 shows direct linear interpolation method which uses a table having 256 data, and formula 4 shows a basic characteristic of an interpolation method which generates 8191 data with the table having 256 data.
                                                                                                              (                    1                    )                                    ⁢                                                                          ⁢                  from                  ⁢                                                                          ⁢                  X                                =                                ⁢                                  1                  ⁢                                                                          ⁢                  to                  ⁢                                                                          ⁢                  256                                            ,                                                                                          X                                  4                  3                                            =                            ⁢                              LUT                ⁡                                  (                  X                  )                                                                                                                                                              (                    2                    )                                    ⁢                                                                          ⁢                  from                  ⁢                                                                          ⁢                  X                                =                                ⁢                                  257                  ⁢                                                                          ⁢                  to                  ⁢                                                                          ⁢                  2047                                            ,                                                                                          X                                  4                  3                                            =                            ⁢                              2                ⁢                                  (                                                            LUT                      ⁡                                              (                                                                                                                                      X                              8                                                        +                            1                                                                                                    )                                                              -                                          LUT                      (                                                                                                X                          8                                                                                            )                                                        )                                ×                                                                                                      ⁢                                                rem                  ⁡                                      (                                          X                      8                                        )                                                  +                                                      LUT                    ⁡                                          (                                                                                                X                          8                                                                                            )                                                        ×                  16                                                                                                                                                              (                    3                    )                                    ⁢                                                                          ⁢                  from                  ⁢                                                                          ⁢                  X                                =                                ⁢                                  2048                  ⁢                                                                          ⁢                  to                  ⁢                                                                          ⁢                  8191                                            ,                                                                                          X                                  4                  3                                            =                            ⁢                              4                ⁢                                  (                                                            LUT                      ⁡                                              (                                                                                                                                      X                              64                                                        +                            1                                                                                                    )                                                              -                                          LUT                      ⁡                                              (                                                                                                        X                            64                                                                                                    )                                                                              )                                ×                                                                                                      ⁢                                                rem                  ⁡                                      (                                          X                      64                                        )                                                  +                                                      LUT                    ⁡                                          (                                                                                                X                          64                                                                                            )                                                        ×                  256                                                                                        Formula        ⁢                                  ⁢        3            
                              X                      4            3                          =                                            (                                                X                  8                                ×                8                            )                                      4              3                                =                                                    (                                  X                  8                                )                                            4                3                                      ×            16                                              Formula        ⁢                                  ⁢        4            
In formula 3, LUT(·) function is a function which shows a table value stored in advance, and rem(·) function is a function which outputs a remaining value of a division. As is shown in formula 3, no error occurs when X is from 1 to 256, because the data itself stored in the table is used. However, in case of data from 257 to 8191, there are errors from the real data which are obtained by the 4/3 power of the data from 257 to 8191, because the interpolated results of which data from 1 to 256 are input. As is the result of a simulation, the maximum error of the direct linear interpolation method is 0.04365 in the range from 257 to 2047, and 0.69832 in the range from 2048 to 8191.
                                                                                                              (                    :                    )                                    ⁢                                                                          ⁢                  from                  ⁢                                                                          ⁢                  X                                =                                ⁢                                  1                  ⁢                                                                          ⁢                  to                  ⁢                                                                          ⁢                  256                                            ,                                                                                          X                                  4                  3                                            =                            ⁢                              LUT                ⁡                                  (                  X                  )                                                                                                                                                              (                    2                    )                                    ⁢                                                                          ⁢                  from                  ⁢                                                                          ⁢                  X                                =                                ⁢                                  257                  ⁢                                                                          ⁢                  to                  ⁢                                                                          ⁢                  3047                                            ,                                                                                        ⁢                              if                ⁢                                                                  ⁢                                  rem                  ⁡                                      (                                          X                      /                      8                                        )                                                  ⁢                                                                                                                        :                                  X                                      4                    3                                                              =                            ⁢                              2                ⁢                                  (                                                            LUT                      ⁡                                              (                                                                                                                                      X                              8                                                        +                            1                                                                                                    )                                                              -                                          LUT                      ⁡                                              (                                                  X                          8                                                )                                                              -                                                                  f                        a                                            ⁢                                                                        (                          x                          )                                                8                                                                              )                                ×                                                                                                      ⁢                                                rem                  ⁡                                      (                                          X                      8                                        )                                                  +                                                      LUT                    ⁡                                          (                                                                        ❘                                                ⁢                                                  X                          8                                                                    )                                                        ×                  16                                                                                                                      ⁢                              if                ⁢                                                                  ⁢                                  rem                  ⁡                                      (                                          X                      /                      8                                        )                                                  ⁢                                                                                                                        :                                  X                                      4                    3                                                              =                            ⁢                              2                ⁢                                  (                                                            LUT                      ⁡                                              (                                                                              X                            8                                                    +                                                      1                            ⁢                                                          |                                                                                                      )                                                              -                                          LUT                      ⁡                                              (                                                                                                        X                            8                                                                                                    )                                                              +                                                                  f                        a                                            ⁢                                                                        (                          x                          )                                                8                                            ×                                                                                                                                                            ⁢                                                (                                      4                    -                                          rem                      ⁡                                              (                                                  X                          8                                                )                                                                              )                                +                                                      LUT                    ⁡                                          (                                                                                                                              X                            8                                                                                                    +                        1                                            )                                                        ×                  16                                                                                                                                                              (                    3                    )                                    ⁢                                                                          ⁢                  from                  ⁢                                                                          ⁢                  X                                =                                ⁢                                  2048                  ⁢                                                                          ⁢                  to                  ⁢                                                                          ⁢                  8191                                            ,                                                                  ⁢                                                                          ⁢                                      rem                    ⁡                                          (                                              X                        /                        64                                            )                                                                      ≤                32                                                                                                        :                                  X                                      4                    3                                                              =                            ⁢                              4                ⁢                                  (                                                            LUT                      ⁡                                              (                                                                              X                            64                                                    +                                                      1                            ⁢                                                          |                                                                                                      )                                                              -                                          LUT                      ⁡                                              (                                                                                                        X                            64                                                                                                    )                                                              -                                                                                                                                                                              ⁢                                                            f                      b                                        ⁢                                                                  (                        X                        )                                            32                                                        )                                ×                                  rem                  ⁡                                      (                                          X                      64                                        )                                                              -                                                LUT                  ⁡                                      (                                                                                        X                        64                                                                                    )                                                  ×                256                                                                                                      ⁢                                                                  ⁢                                      rem                    ⁡                                          (                                              X                        /                        64                                            )                                                                      ≥                32                                                                                                        :                                  X                                      4                    3                                                              =                            ⁢                              4                ⁢                                  (                                                            LUT                      ⁡                                              (                                                                              X                            64                                                    +                                                      1                            ⁢                                                          |                                                                                                      )                                                              -                                          LUT                      ⁡                                              (                                                                              |                                                    ⁢                                                      X                            64                                                                          )                                                              +                                                                                                                                                                              ⁢                                                            f                      b                                        ⁢                                                                  (                        X                        )                                            32                                                        )                                ×                                  (                                                            rem                      ⁡                                              (                                                  X                          64                                                )                                                              -                    64                                    )                                            +                                                                                        ⁢                                                LUT                  ⁡                                      (                                                                                            X                          64                                                ⁢                                                  |                                                                    -                      1                                        )                                                  ×                256                                                                        Formula        ⁢                                  ⁢        5            
                                                        f              a                        ⁡                          (              X              )                                =                                    (                              2892                -                X                            )                                      2              15                                      ,                                  ⁢                                            f              b                        ⁡                          (              X              )                                =                                                    210                -                                  [                                      X                    62                                    ]                                            )                        128                                              Formula        ⁢                                  ⁢        6            
Formula 5 is an improved algorithm for reducing the error of the interpolated data in the process of the inverse quantization efficiently. The characteristic of the improved algorithm is using the additional functions fa and fb, and these fa and fb functions are shown in formula 6. The maximum error of the improved algorithm using 256 tables is 0.02538 in the range from 257 to 2047, and 0.35389 in the range from 2048 to 8191. However, as is shown in formula 5, the improved algorithm uses the rem(·) function which outputs a remaining as a conditional sentence in order to obtain each sample values. Then, it is a disadvantage that operation cycle becomes longer because the conditional instruction of the processor is used in every operation in order to compute X4/3 in the range from 257 to 8191 and accordingly, there is a problem that the amount of operation is increased because the amount of formula to operate is relatively larger than that of the direct linear interpolation method.
At present, as commercial DSP chips for multi-channel high-quality audio processing, there are SHARC DSP's ASDSP-21065L; Cirrus Logic's CS49300 and CS49500; TI's (Texas Instrument) TMSc55x, TMSc64x, and TMSc67x series; LSI Logic's ZSP40x; CLARKSPUR's CD2450 and CD2480; Philips TriMedia's TM-1300 and PNX1500; and Tensilica's Xtensa. Further, ARM's ARM9M and ARM9E are also capable of AAC processing. Most of these commercial DSP chips or processors support the LC profile for multi-channel or stereo channel, moreover TI's TMSc67x, LSI Logic's ZSP series, and SHARC DSP's ASDSP-21065L can support the main profile of AAC.
In general, commercial DSP chips for audio processing assign 24 or 32 bits for data expressions, and they are designed to hold sufficient memory space or to facilitate the I/O with external audio signals so that multi-channel audio processing can be accomplished. Further, in almost every DSP for multi-channel audio system, many hardware resources are run in parallel so as to handle the audio data more than 5.1 channels in real time. For example, SHARC DSP's ASDSP-21065L processor has a Super-Harvard architecture which is capable of running both SIMD (Single Instruction Multiple Data) and SISD (Single Instruction Single Data), then many hardware resources can be run in parallel.
In addition, TMS320c64x, TMS320c67x, TM-1300, and PNX1500 are VLIW (Very Long Instruction Word) processors, and they run quite many hardware resources in parallel by program control using a compiler which is software. In other words, the DSP operation core has Super-Harvard or VLIW architecture in most of the audio only DSP released by commercial DSP chip developing companies, further in many cases, DSP essentially has many ALUs (Arithmetic and Logic Unit) and other hardware resources so that various audio algorithms can be run at high speed. Moreover, in comparison with DSP core, peripheral devices are used more exclusively by audio I/O operations, so in many cases, there exist specialized instructions not for audio signal processing operations but for control of the peripheral devices related to I/O of the audio signals.
However, most of these commercial DSP cores had disadvantages that, their size and the amount of power consumed were relatively large due to their architectural characteristics, and as a result, the efficiency of implementation was lowered when the chips were implemented with SoC (System on a Chip).